Intermediate HTML Questions Breakdown to Crack Any Interview:

 Level             Type

Intermediate                     Forms, semantic tags, audio/video, table, input types

1. What is semantic HTML?
Ans: Semantic tags (like <article>, <section>, <nav>) clearly describe the meaning of the content, improving SEO and accessibility.

2. Explain HTML form elements.
Ans: Used to collect user inputs. Includes <form>, <input>, <textarea>, <select>, <label>, etc.

3. What are input types in HTML5?
Ans: text, password, email, number, date, file, submit, etc.

4. What are HTML attributes?
Ans: Extra information in tags, like id, class, src, href, alt, style, etc.

5. How do you create a table in HTML?
Ans:
Using table tag:
<table>
    <tr><th>Name</th><th>Age</th></tr>
    <tr><td>Amit</td><td>25</td></tr>
</table>

6. What is the use of the alt attribute in <img>?
Ans: Provides alternate text for an image, important for accessibility and SEO.

7. What is the difference between id and class?
Ans:
  • id is unique per page (#id)
  • class can be used multiple times (.class)
8. What are block and inline elements?
Ans:
  • Block: takes full width (e.g., <div>, <p>)
  • Inline: takes only required width (e.g., <a>, <span>)
9. What is a placeholder in forms?
Ans:
It shows hint text inside input fields using the placeholder attribute.

10. How do you embed audio/video in HTML5?
Ans:

<audio controls src="audio.mp3"></audio>
<video controls width="300" src="video.mp4"></video>














Comments

Popular posts from this blog

PHP INTERVIEW QUESTIONS

PHP Intermediate Questions Interview Preparation

PHP Interview Questions (Beginner Level) – Short Answers